

message(STATUS "Configuring myLog...")
aux_source_directory(. LIB_SRCS)			# 添加当前目录下所有的源文件
aux_source_directory(./easylogging LIB_SRCS)			# 添加当前目录下所有的源文件

aux_source_directory(./easylogger/src LIB_SRCS)			# 添加当前目录下所有的源文件
aux_source_directory(./easylogger/port LIB_SRCS)			# 添加当前目录下所有的源文件
aux_source_directory(./easylogger/plugins/file LIB_SRCS)

set(includePath 
${CMAKE_CURRENT_SOURCE_DIR}/easylogging 
${CMAKE_CURRENT_SOURCE_DIR}/easylogger/inc
${CMAKE_CURRENT_SOURCE_DIR}/easylogger/plugins/file
)

get_property(BIN GLOBAL PROPERTY "BIN_DIR" ) 

# 定义easylogging支持线程安全的宏定义
add_definitions(-DELPP_THREAD_SAFE)
# add_definitions(-DELPP_UNICODE)
# 设置包含的目录
include_directories(${includePath})
if (debug STREQUAL "ON" OR debug STREQUAL "on")
    add_library (myLog STATIC ${LIB_SRCS} )				# 当前目录下的文件生成一个静态链接库

    # 显示INCLUDE_OPENCL 
    MESSAGE(STATUS "myLog BIN :${BIN}")
    install(TARGETS myLog 
    ARCHIVE DESTINATION ${BIN} 
    )
else()
    add_library (myLog SHARED ${LIB_SRCS} )				# 当前目录下的文件生成一个链接库
	
    # 显示INCLUDE_OPENCL 
    MESSAGE(STATUS "myLog BIN :${BIN}")
    install(TARGETS myLog 
    LIBRARY DESTINATION ${BIN} 
    )
endif()